﻿using System.ComponentModel.DataAnnotations;

namespace LERP.Web.Controllers.ViewModels.CustomerViewModels
{
    public class CreateFirstCustomerViveModel  
    {


        /// <summary>
        /// 客户名称
        /// </summary> 
        [Display(Name = "客户名称")]
        [StringLength(64, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual string Name { get; set; }
        /// <summary>
        /// 联系人名称
        /// </summary> 
        [Display(Name = "联系人名称")]
        [StringLength(64, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        public virtual string Linkman { get; set; }

        /// <summary>
        /// 手机号
        /// </summary> 
        [Display(Name = "手机号")]
        [StringLength(32, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        [RegularExpression("1\\d{10}", ErrorMessage = "不是合法的{0}格式,正确格式：13560123123")]
        public virtual string Mobile { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary> 
        [Display(Name = "邮箱")]
        [StringLength(32, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        [RegularExpression("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*", ErrorMessage = "不是合法的{0}格式,正确格式：username@qq.com")]
        public virtual string Email { get; set; }
        /// <summary>
        /// 传真
        /// </summary> 
        [Display(Name = "传真")]
        [StringLength(32, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        [RegularExpression("\\d{3}-\\d{8}|\\d{4}-\\d{7}", ErrorMessage = "不是合法的{0}格式,正确格式：020-88888888")]
        public virtual string Fax { get; set; }
        /// <summary>
        ///备注
        /// </summary>  
        [Display(Name = "备注")]
        [StringLength(500, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        public virtual string Remark { get; set; }
    }
}